import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import './api/request.js'
import './assets/css/global.css'
import * as echarts from 'echarts'

// 注册全局组件
import Header from './components/HeaderView'

// 引入 element-ui
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// 引入element-ui字体图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

const app = createApp(App)

app.use(ElementPlus)
// 引入element-ui字体图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.config.globalProperties.$echarts = echarts
app.component('my-header', Header)

app.use(router)
app.mount('#app')
